package com.ph.demo.designPattern;

/**
 * Created by peng on 2019/4/19.
 */
public class LoadOrder {
}

class HelloA{
    public HelloA(){
        System.out.println("HelloA 构造函数");
    }

    static { System.out.println("HelloA static语句块执行"); }

}



class HelloB extends HelloA{
    public final static int Y=200;
    public HelloB(){

        System.out.println("HelloB 构造函数");
    }
    public static void display(){
        System.out.println("HelloB 静态方法被执行");
    }
    static { System.out.println("HelloB static语句块执行"); }
}

 class Test {
     public static void main(String[] args) {

         int y = HelloB.Y;

         //new HelloB();
         //
         //new HelloB();

     }
 }
